package p2000;

import java.util.Scanner;

public class Main2010水仙花数 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int m = scanner.nextInt();
            int n = scanner.nextInt();

            String result = "";
            for (int i = m; i <= n; i++) {
                int a = i / 100;
                int t = i % 100;
                int b = t / 10;
                int c = t % 10;

                if (a * a * a + b * b * b + c * c * c == i) {
                    result += i + " ";
                }
            }
            if (result.length() == 0) {
                System.out.println("no");
            } else {
                System.out.println(result.substring(0, result.length() - 1));
            }
        }
    }

}
